package com.example.schedulist;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DateDBHelper extends SQLiteOpenHelper{
	private static final String DBASE_STRING="text.db";
	private static final int DBASE_VERSION = 1;
	private String createTable = "CREATE TABLE thing VALUES(user_id PRIMARY KEY INTEGER,thing_id PRIMARY KEY INTERGER AUTOINCREDEMENT," +
			"date REAL,where REAL,withwho REAL,what VARCHAR(200),startime TIME,lastlong VARCHAR(20)," +
			"alarm BOOLEAN,done BOOLEAN,level INTEGER)";

	public DateDBHelper(Context context) {
		super(context, DBASE_STRING, null, DBASE_VERSION);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL(createTable);
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		db.execSQL("ALERT TABLE thing ADD COLUMN other STRING");
	}

}
